#pragma once

#include "defines.h"
#include "../../StarEngine/jni/Scenes/BaseScene.h"
#include "Logger.h"
#include "Context.h"
#include "Objects/Object.h"
#include "StarComponents.h"
#include "Input/Gestures/TapGesture.h"
#include "Objects/FreeCamera.h"
#include "Helpers/Timer.h"

#include "Objects/Object.h"
#include "../Objects/Grid.h"
#include "../Objects/Selector.h"
#include "../Objects/HUD.h"
#include "../Objects/Line.h"
#include "../Objects/GameOverScreen.h"
#include "../Objects/PauseScreen.h"

class MainScene : public star::BaseScene
{
public:
	MainScene(const tstring& name);
	virtual ~MainScene();

	void CreateObjects();
	void AfterInitializedObjects();
	void Update(const star::Context& context);
	void Draw();
	void ResetGame();

private:

	//Members
	int m_TotalFrames;
	int m_Step;
	int m_FPS;
	int m_CurrentAnimation;
	float m_PassedMiliseconds;

	star::BaseCamera *m_pActiveCamera;
	star::TapGesture *m_TapGesture;
	star::Object *m_pBackground,
				  *m_pScreenOverlay;
	Grid *m_pGridObj;
	Selector *m_pSelectorObj;
	HUD *m_pHUD;
	GameOverScreen *m_pGameOverScreen;
	PauseScreen *m_pPauseScreen,
				*m_pLoadingScreen;
	bool m_bIsGameOver, 
		 m_bIsPaused,
		 m_bFirstTick;
	float m_CooldownTimer;

	MainScene(const MainScene& t);
	MainScene(MainScene&& t);
	MainScene& operator=(const MainScene& t);
	MainScene& operator=(MainScene && t);
};
